package com.dianba.commons.aop;

import org.aspectj.lang.ProceedingJoinPoint;
import org.aspectj.lang.annotation.Around;
import org.aspectj.lang.annotation.Aspect;
import org.aspectj.lang.annotation.Pointcut;
import org.springframework.stereotype.Service;

import com.dianba.commons.aop.AbstractExceptionAspect;
import com.dianba.commons.exception.util.DefaultFormatResultUtil;
import com.dianba.commons.exception.util.VoidFormatResultUtil;

@Service
@Aspect
public class AppApiControllerAOP extends AbstractExceptionAspect {
	private static final String EXECUTION = "execution(* com.dianba.supply.*.controller.*.*(..))";

	/**
	 *
	 *
	 * @author zhoucong
	 * @date 2016年3月30日 下午3:58:43
	 */
	public AppApiControllerAOP() {
		super(new VoidFormatResultUtil(), new DefaultFormatResultUtil());
	}

	@Pointcut(EXECUTION)
	public void appControllerPoint() {
		log.info(">>>>>>>>>>>>>>");
	}

	@Around(value = "appControllerPoint()")
	public Object process(ProceedingJoinPoint point) throws Throwable {
		return super.process(point);
	}

}